]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
windowMenu: Port from Meta.ScreenDirection to Meta.DisplayDirection
authorJürg Billeter <j@bitron.ch>
Tue, 11 Sep 2018 10:55:55 +0000 (12:55 +0200)
committerJürg Billeter <j@bitron.ch>
Tue, 11 Sep 2018 10:59:07 +0000 (12:59 +0200)
Meta.ScreenDirection no longer exists. This fixes window menus on
multi-monitor systems.

JS ERROR: TypeError: Meta.ScreenDirection is undefined
_buildMenu@resource:///org/gnome/shell/ui/windowMenu.js:135:17

js/ui/windowMenu.js

index 32e3be6988e6c5bbd7c8eb72cadda4be664f972b..11d4f17b632c735e820ba1859f4e57f86a5f46d4 100644 (file)
@@ -132,7 +132,7 @@ var WindowMenu = new Lang.Class({
         if (nMonitors > 1 && monitorIndex >= 0) {
             this.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
 
-            let dir = Meta.ScreenDirection.UP;
+            let dir = Meta.DisplayDirection.UP;
             let upMonitorIndex =
                 display.get_monitor_neighbor_index(monitorIndex, dir);
             if (upMonitorIndex != -1) {
@@ -141,7 +141,7 @@ var WindowMenu = new Lang.Class({
                 });
             }
 
-            dir = Meta.ScreenDirection.DOWN;
+            dir = Meta.DisplayDirection.DOWN;
             let downMonitorIndex =
                 display.get_monitor_neighbor_index(monitorIndex, dir);
             if (downMonitorIndex != -1) {
@@ -150,7 +150,7 @@ var WindowMenu = new Lang.Class({
                 });
             }
 
-            dir = Meta.ScreenDirection.LEFT;
+            dir = Meta.DisplayDirection.LEFT;
             let leftMonitorIndex =
                 display.get_monitor_neighbor_index(monitorIndex, dir);
             if (leftMonitorIndex != -1) {
@@ -159,7 +159,7 @@ var WindowMenu = new Lang.Class({
                 });
             }
 
-            dir = Meta.ScreenDirection.RIGHT;
+            dir = Meta.DisplayDirection.RIGHT;
             let rightMonitorIndex =
                 display.get_monitor_neighbor_index(monitorIndex, dir);
             if (rightMonitorIndex != -1) {